tmp<-read.table("intapp.res")
intapp <- t(tmp)
tmp <- read.table("eulapp.res")
eulapp <- t(tmp)
tmp<-read.table("intappav.res")
intappav <- t(tmp)
tmp <- read.table("eulappav.res")
eulappav <- t(tmp)


maxapp <- max(intapp, eulapp, intappav, eulappav)
minapp <- min(intapp, eulapp, intappav, eulappav)
iters <- seq(100, 15100, 500)
plot(iters,intapp, type="l",col="red",ylim=c(minapp,maxapp))
lines(iters,eulapp, col="blue")
lines(iters,intappav, col="red", lty=2)
lines(iters,eulappav, col="blue",lty=2)
abline(a=0, b=11.5543)
legend(5000,11.3,c("Approximation with Integral", "Approximation with Integral\nand Variance Reduction", "Approximation with Euler", "Approximation with Euler\nand Variance Reduction"), lty=c(1,2,1,2), col=c("red","red","blue","blue"),y.intersp=1.22)